/**
 * MoteAppNavActivity.java
 *
 * Created by Andrew Moss on 11 Oct 2010
 *
 * Description
 */
package com.mossdev.android.moteapp;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ImageButton;
import com.mossdev.android.moteapp.comms.Commands;
import com.mossdev.android.moteapp.listeners.ButtonOnClickListener;

/**
 * An Activity to allow the user to send the navigation buttons to
 * the 'remote'.
 * @author Andrew Moss
 *
 */
public class MoteAppNavActivity extends Activity {
	
	    public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        setContentView(R.layout.nav);
	        
	        //Set up buttons
	        ImageButton temp_button;
	        temp_button = (ImageButton)findViewById(R.id.SkipBack);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.SKIP_BACK));
	        temp_button = (ImageButton)findViewById(R.id.Rewind);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.REWIND));
	        temp_button = (ImageButton)findViewById(R.id.Stop);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.STOP));
	        temp_button = (ImageButton)findViewById(R.id.Play);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.PLAY));
	        temp_button = (ImageButton)findViewById(R.id.Pause);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.PAUSE));
	        temp_button = (ImageButton)findViewById(R.id.FastForward);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.FAST_FORWARD));
	        temp_button = (ImageButton)findViewById(R.id.SkipForward);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.SKIP_FORWARD));
	        temp_button = (ImageButton)findViewById(R.id.VolUp);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.VOLUME_UP));
	        temp_button = (ImageButton)findViewById(R.id.VolDown);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.VOLUME_DOWN));
	        
	        temp_button = (ImageButton)findViewById(R.id.Up);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.UP));
	        temp_button = (ImageButton)findViewById(R.id.Left);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.LEFT));
	        temp_button = (ImageButton)findViewById(R.id.Ok);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.SELECT));
	        temp_button = (ImageButton)findViewById(R.id.Right);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.RIGHT));
	        temp_button = (ImageButton)findViewById(R.id.Down);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.DOWN));
	        
	        temp_button = (ImageButton)findViewById(R.id.Back);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.BACK));
	        temp_button = (ImageButton)findViewById(R.id.Menu);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.START));
	        temp_button = (ImageButton)findViewById(R.id.Info);
	        temp_button.setOnClickListener(new ButtonOnClickListener(Commands.INFO));
	        
	    }

}
